﻿#!/usr/bin/python3
# -*- coding:utf-8 -*-
from django.urls import path
from . import views
from .routing import websocket_urlpatterns

urlpatterns = [
    # markdown
    path('editor/', views.Editor.as_view(), name="edit_markdown"),
    path('exitEditor/', views.exitEditor, name="exitEditor"),
    path('uploadImage/', views.uploadImage, name="uploadImage"),
    path('modify_markdown/', views.modify_markdown, name="modify_markdown"),    # 保存markdown文档
    # fileList
    path('get_filelist/', views.get_filelist, name="get_filelist"),
    path('fileList/', views.FileList.as_view(), name="fileList"),   # post切换子目录
    path('createFile/', views.createFile, name='createFile'),
    path('deleteFile/', views.deleteFile, name="deleteFile"),
    path('deleteDir/', views.deleteDir, name="deleteDir"),
    path('getDirList/', views.getDirList, name="query_files"),
    # ---fileList:移动文件----
    path('getSpaceList/', views.getSpaceList, name="getSpaceList"),
    path('getSpaceDirsList/', views.getSpaceDirsList, name="getSpaceDirsList"),
    path('moveFile/', views.moveFile, name="moveFile"),
    # view
    path('view_markdown/', views.view_markdown, name="view_markdown"),
    # uploadFile
    path('uploadFile/', views.UploadFile.as_view(), name="uploadFile"),
    path('uploadFileDiv/', views.uploadFileDiv, name='uploadFileDiv'),
    # test
    path('query_config/', views.query_config),
    # luckysheet -- 不能协同编辑，已放弃
    path('sheet/', views.EditExcel.as_view(), name='edit_excel'),
    path('saveSheet/', views.saveSheet, name='saveSheet'),
    path('queryEditor/', views.queryEditor, name='queryEditor'),
    #  查看官网demo
    path('sheet/viewDemo/', views.viewDemo, name='viewDemo'),
    # sheetEdit -- 支持协同编辑
    path('sheetEdit/', views.LuckySheetLoadUrl.as_view(), name='sheetEdit'),
    path('saveSheetData/', views.LuckySheetSaveDb.as_view(), name='saveSheetData'),
    # redis
    path('setRedis/', views.setRedis, name='setRedis'),
    path('getRedis/', views.getRedis, name='getRedis'),
    path('actRedis/', views.actRedis, name='actRedis'),

] + websocket_urlpatterns